<!DOCTYPE html>
<html>
<head>
<title>{$site_name}</title>
<meta name="keywords" content="{$site_seo_keywords}" />
<meta name="description" content="{$site_seo_description}">
<meta name="author" content="ThinkCMF">
<tc_include file="Public:head" />
</head>

<body class="body-white" id="top">
	<tc_include file="Public:nav" />

		<div class="container tc-main">
                <div class="row">
                    <div class="span3">
	                    <tc_include file="Public:usernav"/>
                    </div>
                    <div class="span9">
                           <div class="tabs">
                               <ul class="nav nav-tabs">
                                   <li class="active"><a href="#one" data-toggle="tab"><i class="fa fa-comments-o"></i>银行卡管理</a></li>
                               </ul>
                               <div class="tab-content">
                                   <div class="tab-pane active" id="one">
                                   		
                                   		<table class="table table-bordered table-striped table-hover">
									    <thead>
									      <tr>
									       
									        <th>银行名称</th>
									        <th width="150">账户名称</th>
									        <th width="150">帐号尾号</th>
											<th >操作</th>
									      </tr>
									    </thead>
									    <tbody>
									  <foreach name="bank" item="vo">
										<tr>
										<td>{$vo.bank_name}</td>
										<td>{$vo.real_name}</td>
										<td>{:substr($vo['bankcard'],-4,4)}</td>
										<td>
											<a class="a_link J_deal_bank" dataid="{$vo.id}" href="javascript:void(0);">删除此银行卡</a>
											
									 <a href="{:U('User/Money/index',array('act'=>'carry','id'=>$vo['id']))}">提现</a></td>
								
									
								</tr>
				</foreach>
								
									<tr>	
										<td colspan="4" style="text-align:center;">
											<a href="{:U('User/Money/index',array('act'=>'bank_add'))}" class="a_link "  >	 <img src="__TMPL__Public/images/add.jpg" alt="添加银行卡">
											</a>
					
					 <span>请先添加银行卡号</span>
											
										</td>
									</tr>
								  		
									  
									  
									   
									    </tbody>
									  </table>
                                   		
                                   	
                                   
                                   
                                   	
                                   </div>
                                   
                                   
                               </div>							
                           </div>
                    </div>
                </div>

		<tc_include file="Public:footer" />

	</div>
	<!-- /container -->

	<tc_include file="Public:scripts" />
	<script type="text/javascript">
	jQuery(function(){
		$(".J_deal_bank").click(function(){
			var obj = $(this);
			var query = new Object();
			query.id = $(this).attr("dataid");
			if(confirm("确定要删除吗")){
				$.ajax({
					url:"{:U('user/money/del')}",
					data:query,
					type:"post",
					dataType:"json",
					success:function(result){
						if(result.status==1)
						{
							obj.parent().parent().fadeOut("fast",function(){
								obj.parent().parent().remove();
							});
						}
						else{
							$.showErr(result.info);
						}
					},
					error:function(){
						$.showErr("发生错误");
					}
				});
			}
		});
	});

</script>
	
	
</body>
</html>